aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(app)/[username]/generate/+server.js
blob: 1335c3e2558a219366e60a3c03084ad3af2eca30 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
import { auth, post } from '$lib/utils';
import { error, json } from '@sveltejs/kit';

export async function POST({ cookies, request }) {
	try {
		return json(await post(`/user`, await request.json(), auth(cookies)));
	} catch (e) {
		throw error(500, e.message);
	}
}